package com.xiyun.easyapi.controller;

import com.xiyun.easyapi.config.util.Res;
import com.xiyun.easyapi.controller.request.PermissionRuleReq;
import com.xiyun.easyapi.controller.response.PermissionRuleRes;
import com.xiyun.easyapi.service.PermissionRuleService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@Tag(name = "权限规则管理")
@RequestMapping("pt/permissionRule")
public class PermissionRuleController {
    @Autowired
    private PermissionRuleService service;

    @Operation(summary = "获取权限规则")
    @PostMapping("get")
    public Res<PermissionRuleRes.get> get(@RequestBody @Validated PermissionRuleReq.get param) {
        return service.get(param);
    }
}